Skip to main content

Simulate swipe-up quit (app.quit)

Declaration​

app.quit(bid)

Parameters​

  • bid
    String. App bundle identifier. Use "*" to quit all. Bundle id can be found in XXT App -> More -> App List.

Description​

  • Also a force quit, but unlike app.close, the app receives a notification and has up to 10 seconds to save data before being fully terminated. It also clears the app's multitasking card.
  • Do NOT use while the screen is locked. It may fail to quit apps running with root privileges and could freeze the UI; for root apps, prefer app.close.

Example​

-- Quit all apps
app.quit("*")
-- Quit QQ if it is running
app.quit("com.tencent.mqq")